
from django.db import models

# Create your models here.
# 数据库或数据操作的类/模型


class User(models.Model):
    id = models.AutoField(primary_key=True)
    uname = models.CharField(max_length=50)
    upwd = models.CharField(max_length=100)
    # active inactive
    status = models.CharField(max_length=10)


class Article(models.Model):
    id = models.AutoField(primary_key=True)
    title = models.CharField(max_length=50)
    content = models.TextField()
    # deleted alive
    status = models.CharField(max_length=10)


class SqlTest(models.Model):
    id = models.AutoField(primary_key=True)
    name = models.CharField(max_length=255)

# 正式数据库模型


class EvaluationIndex(models.Model):
    id = models.AutoField(primary_key=True)
    name = models.CharField(max_length=255)
    predict = models.FloatField(null=True)
    # 偿债能力
    LR = models.FloatField(null=True)
    QR = models.FloatField(null=True)
    CR = models.FloatField(null=True)
    DNWR = models.FloatField(null=True)
    ER = models.FloatField(null=True)
    ICR = models.FloatField(null=True)
    # 盈利能力
    NAIR = models.FloatField(null=True)
    NPMC = models.FloatField(null=True)
    ROA = models.FloatField(null=True)
    ROPC = models.FloatField(null=True)
    JROA = models.FloatField(null=True)
    CROE = models.FloatField(null=True)
    # 营运能力
    ROST = models.FloatField(null=True)
    TATO = models.FloatField(null=True)
    TOAR = models.FloatField(null=True)
    # 成长能力
    GRON = models.FloatField(null=True)
    IROBR = models.FloatField(null=True)
    TAGR = models.FloatField(null=True)
    GROOP = models.FloatField(null=True)
    NPGR = models.FloatField(null=True)
    index = models.IntegerField()
